package com.example.administrator.basepro.ui.act;

import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

import com.example.administrator.basepro.App;
import com.example.administrator.basepro.R;
import com.example.administrator.basepro.utils.ActivityUtils;
import com.example.administrator.basepro.utils.SPUtils;

/**
 * Created by Administrator on 2017/8/31 0031.
 */

public class SplashActivity extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_splash);

        final boolean isLogin=true;
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                if (isLogin){
                    ActivityUtils.startActivity(LoginActivity.class);
                }else {
                    ActivityUtils.startActivity(MainActivity.class);
                }
                finish();
                App.getInstance().removeActivity(SplashActivity.this);
            }
        },2000);


    }
}
